import Vue from 'vue'
import Router from 'vue-router'

Vue.use(Router)

export default new Router({
  mode: 'history',
  base: '/airplane/',
  // base: '/',
  routes: [
    {
      path: '/',
      redirect: '/login',
      meta: {allowBack: false}
    },
    {
      path: '/home',
      component: resolve => require(['../components/common/Home.vue'], resolve),
      meta: {allowBack: false},
      children: [
        {
          path: '/platView', // 平台概况
          component: resolve => require(['../components/BusinessPlat/PlatView.vue'], resolve)
        },
        {
          path: '/categoryMana', // 分类管理
          component: resolve => require(['../components/BusinessPlat/CategoryMana.vue'], resolve)
        },
        {
          path: '/labelMana', // 标签管理
          component: resolve => require(['../components/BusinessPlat/LabelMana.vue'], resolve)
        },
        {
          path: '/businiessMana', // 商家管理
          component: resolve => require(['../components/BusinessPlat/BusiniessMana.vue'], resolve)
        },
        {
          path: '/couponMana', // 优惠券管理
          component: resolve => require(['../components/BusinessPlat/CouponMana.vue'], resolve)
        },
        {
          path: '/lostMana', // 失物管理
          component: resolve => require(['../components/BusinessPlat/LostMana.vue'], resolve)
        },
        {
          path: '/categoryManaLost', // 失物分类管理
          component: resolve => require(['../components/BusinessPlat/CategoryManaLost.vue'], resolve)
        },
        {
          path: '/lostReport', // 失物上报
          component: resolve => require(['../components/BusinessPlat/LostReport.vue'], resolve)
        },
        {
          path: '/hotlineMana', // 热线管理
          component: resolve => require(['../components/BusinessPlat/HotlineMana.vue'], resolve)
        },
        {
          path: '/airplaneMana', // 航班管理
          component: resolve => require(['../components/BusinessPlat/AirplaneMana.vue'], resolve)
        },
        {
          path: '/remindContent', // 提醒内容字典
          component: resolve => require(['../components/BusinessPlat/RemindContent.vue'], resolve)
        },
        {
          path: '/remindStrate', // 提醒策略
          component: resolve => require(['../components/BusinessPlat/RemindStrate.vue'], resolve)
        },
        {
          path: '/userList', // 用户列表
          component: resolve => require(['../components/BusinessPlat/UserList.vue'], resolve)
        },
        {
          path: '/feedback', // 意见反馈
          component: resolve => require(['../components/BusinessPlat/Feedback.vue'], resolve)
        },
        {
          path: '/accountMana', // 账户管理
          component: resolve => require(['../components/BusinessPlat/AccountMana.vue'], resolve)
        },
        {
          path: '/roleMana', // 角色管理
          component: resolve => require(['../components/BusinessPlat/RoleMana.vue'], resolve)
        }
      ]
    },
    {
      path: '/login',
      component: resolve => require(['../components/login/Login.vue'], resolve)
    }
  ]
})
